/*--------------------------------------------------------------------------------------------------
Yatak Operation System Project Copyright 2012
Author : Ilya Churaev
Started : 30 Apr 2012		Updated : 30 Apr 2012
File Name : time.h		Purpose : Declarations for obtaining system time
--------------------------------------------------------------------------------------------------*/
#ifndef _TIME_H
#define _TIME_H

#ifdef __cplusplus
extern "C" {
#endif

typedef struct time_str_tag
{
	int hour;
	int minute;
	int second;
}systime;

typedef struct date_str_tag
{
	int year;
	int month;
	int date;
	int day;
}sysdate;

void get_time(systime*);
void get_date(sysdate*);
void timeprint(const systime time);
void dateprint(const sysdate date);
void get_str_time (char * str, const systime time);
void get_str_date (char * str, const sysdate date);

unsigned int get_time_sec ();
unsigned int get_sec_from_time (const systime time);
void get_time_count (systime *time, unsigned int stime, unsigned int etime);
void get_difference_times (systime *time, const systime stime, const systime etime);

#ifdef __cplusplus
}
#endif

#endif
